package com.roin.learn.mybatisplus.controller;


import com.roin.learn.mybatisplus.domain.User;
import com.roin.learn.mybatisplus.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author Roin
 * @since 2020-12-30
 */
@RestController
@RequestMapping("/user")
public class UserController {

    @Autowired
    UserService userService;

    @RequestMapping("getAll")
    public List<User> getAll(){
        return userService.list();
    }
}
